package com.miracle9.game.service;

import com.miracle9.game.entity.AdminLog;
import java.util.Map;
import org.hibernate.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("adminLogService")
public class AdminLogService
{
  @Autowired
  private com.miracle9.game.dao.AdminLogServiceDao adminLogServiceDao;
  
  public void addAdminLog(AdminLog adminLog)
  {
    this.adminLogServiceDao.save(adminLog);
    com.miracle9.game.util.GameParameterAssist.aL.put(adminLog.getAdmin(), adminLog);
  }
  
  public void deletePastAdminLog(String date)
  {
    this.adminLogServiceDao.q_CreateSql("delete from AdminLog where datetime<?", new Object[] { date }).executeUpdate();
  }
}
